package com.liukai.service.impl;

import com.liukai.service.UserService;
import com.liukai.springioc.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServicempl implements UserService {
    private UserDao userDao;
   //@Autowired
    public void setUserDao(UserDao userDao) {
        System.out.println("通过setter注入UserDao");
        this.userDao = userDao;
    }

    public UserServicempl() {
    }
    @Autowired
    public UserServicempl(UserDao userDao) {
        System.out.println("通过构造函数注入");
        this.userDao = userDao;
    }

    @Override
    public void delUser() {
           userDao.del();
    }

    @Override
    public void updateUser() {

        userDao.update();
    }
}
